I want to use CKEDITOR in my form.
I pass the model to CKEDITOR but nothing happens, I did the same thing without using the form and it works correctly, What is the reason?
I have uploaded the codes and images below,
please guide me!
Thanks,
package.json
//...
"@angular/core": "^11.2.2",
"@angular/forms": "^11.2.2",
"ng2-ckeditor": "^1.3.4",
//...
index.html
<!--...-->
<form *ngIf="active" #ticketForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
<ckeditor #ticket_MessageOfTicket="ngModel"
[(ngModel)]="this.messageOfTicket"
[config]="config"></ckeditor>
<!--...-->
</form>
<!--...-->
index.component.ts
//...
config:any = {
contentsLangDirection: 'rtl',
}
//...
ngOnInit(): void {
this.messageOfTicket="<p>Hello <strong>world !</strong></p>";
}
//...